%提取一个周期的波形，程序测试
clc;clear
horse_1 = xlsread('E:\马的心电图特征提取\data.xlsx','sheet1','A1:CB1');   %读取马的心跳数据

 figure(1)
 x = 1:1:80;
plot(x,horse_1);
A = max(horse_1)

[max_x,max_y] = findpeaks(horse_1);
hold on
plot(max_y,max_x,'ro')

% nhourse_1 = A-horse_1;
% [min_x,min_y] = findpeaks(nhourse_1);


% figure(2)
nhourse_1 = A-horse_1;
[min_x,min_y] = findpeaks(nhourse_1);
% hold on
% plot(x,nhourse_1)
hold on 
plot(min_y,A-min_x,'go','LineWidth',1.5)

 




